
    use: 'ie.ondevice.utility.statemachine.StateMachine';

    State.implement
    (
        {
            /**
             * The state machine associated with this state.
             * @type {StateMachine}
             */
            machine: null
            
            /**
             * The method that is invoked when a state machine enters this
             * state. This is where your setup logic should be implemented.
             * 
             * @return {void}
             */
        ,   enter: function () 
            {
                ; // abstract
            }
            
            /**
             * The method that is invoked when a state machine exits this
             * state. This is where your teardowm logic should be implemented
             * @return {void}
             */
        ,   exit: function () 
            {
                ; // abstract
            }
            
            /**
             * The method that is invoked when this state is no longer required
             * by a state machine. 
             * @return {void}
             */
        ,   dispose: function () 
            {
                delete this.machine;
            }
        }
    );
    
    /**
     * 
     * @param {StateMachine} machine
     * @constructor
     */
    function State(machine) 
    {
        if (!StateMachine.is(machine))
            throw new TypeError('StateMachine expected');
            
        this.machine= machine;
    };
